package com.example.user.controller;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.example.user.config.Result;
import com.example.user.entity.SellerInfo;
import com.example.user.service.UserService;

/**
 * \* @author: bear
 * \* Date: 2022-04-07-15:19
 * \* describe:
 */
@RestController
@RequestMapping("/index")
public class UserController {

	@Resource
	private UserService userService;

	@GetMapping("/userinfo")
	public Result getUserInfo(@RequestParam String username){
		SellerInfo userInfo = userService.getUserInfo(username);
		return Result.succeed(userInfo);
	}
}
